package org.blog.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

/**
 * 博客文章保存入参 DTO
 */
@Data
public class BlogEssayDTO {
    @ApiModelProperty(value = "文章表主键")
    private String id;

    @ApiModelProperty(value = "文章标题")
    private String essayTitle;

    @ApiModelProperty(value = "作者id（用户id）")
    private String authorId;

    @ApiModelProperty(value = "作者（用户昵称）")
    private String author;

    @ApiModelProperty(value = "文章摘要")
    private String summary;

    @ApiModelProperty(value = "文章内容，富文本")
    private String essayContent;

    @ApiModelProperty(value = "文章分类id")
    private String categoryId;

    @ApiModelProperty(value = "浏览量")
    private Long viewCount;

    @ApiModelProperty(value = "封面图片")
    private String coverImage;

    @ApiModelProperty(value = "文章状态，0：草稿中，1：已发布，2：已下架")
    private Integer essayStatus;

    @ApiModelProperty(value = "发布时间，文章状态为已发布时，必填")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date publishedAt;
}
